package org.anupta.game.server.game.packet.account;

import org.anupta.game.main.Main;
import org.anupta.game.server.game.client.GameClient;
import org.anupta.game.server.game.packet.GamePacket;
import org.anupta.game.utils.others.Config;

public class QueueAccount extends GamePacket {

	public QueueAccount(GameClient client) {
		super(client);
		pack();
		doPacket();
	}

	@Override
	public void unpack() {
	}

	@Override
	public void pack() {
		int pos = 1;
        int suscribe = 0;
        int noSuscribe = 0;
        boolean isSuscribe = true;
        //TODO: Is subscribe -> subscribe++ else noSubscribe++
        packetOut.append("Af").append(pos).append('|').append(suscribe).append('|').append(noSuscribe)
                .append('|').append(isSuscribe ? 1 : 0).append("|").append(Config.ID).toString();
	}

	@Override
	public void doPacket() {
		client.send(packetOut.toString());
		Main.out.println(new StringBuilder("QueueAccount packet sended to : ").append(client.getIp()).toString());
	}
}
